package models

import "gorm.io/gorm"

type Job struct {
	gorm.Model
	Name        string  `gorm:"type:varchar(100);not null;commit:'职位名称'"`
	Type        string  `gorm:"type:varchar(50);not null;commit:'职位类别'"`
	WorkAddress string  `gorm:"type:varchar(150);not null;commit:'工作地址'"`
	Info        string  `gorm:"type:varchar(150);not null;commit:'工作标签'"`
	Price       float64 `gorm:"type:decimal(10,2);not null;commit:'价格'"`
	Desc        string  `gorm:"type:varchar(100);not null;commit:'描述'"`
}

func (j *Job) JobCreate() error {
	return DB.Debug().Create(&j).Error
}
